package com.yangxk.kadmin.generator.url.sub;

import com.yangxk.kadmin.generator.url.UrlDesc;
import com.yangxk.kadmin.generator.util.Tools;

import java.util.ArrayList;
import java.util.List;

public class ReportUrl extends AbstractUrl {

    private static final String URL = "/report/{0}";
    private static final String URL_CODE = "report:{0}";

    public ReportUrl(String modelName, String zhModelName) {
        this.modelName = modelName.toLowerCase();
        this.zhModelName = zhModelName;
        super.init();
    }

    @Override
    public List<UrlDesc> getUrlDesc() {
        List<UrlDesc> result = new ArrayList<>();
        result.add(new UrlDesc(Tools.formatStr(URL, modelName), zhModelName, Tools.formatStr(URL_CODE, modelName)));
        return result;
    }

    @Override
    public String getRoute() {
        return Tools.formatStr(URL, modelName);
    }

}
